package com.sakila.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.sakila.dao.CityDao;
import com.sakila.pojo.City;
import com.sakila.pojo.Country;
import com.sakila.pojo.other.Page;
import com.sakila.service.CityService;

@Service
public class CityServiceImpl implements CityService {
	@Resource
	private CityDao cityDao;

	@Override
	public List<City> findAll() {
		Country country = new Country();
		country.setId(103); //USA
		return cityDao.findByCountry(country);
	}

	@Override
	public List<City> findAll(Page page) {
		return cityDao.findAll(page);
	}
}
